package com.cauli.file.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cauli.file.model.dto.file.UserFileDTO;
import com.cauli.file.model.entity.UserFile;
import com.cauli.file.model.vo.file.FileListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Cauli
 * @date 2023-03-18 12:00
 * @description 用户文件详情 参数实体映射
 */
@Mapper
public interface UserFileMapper extends BaseMapper<UserFile> {
    List<UserFile> selectUserFileByLikeRightFilePath(@Param("filePath") String filePath, @Param("userId") Long userId);

    IPage<FileListVO> selectPageVo(Page<?> page, @Param("userFileDTO") UserFileDTO userFileDTO, @Param("fileTypeId") Integer fileTypeId,
                                   @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    Long selectStorageSizeByUserId(@Param("userId") Long userId);
}
